<script setup lang="ts">
import router from "@/router";
import { useOauthStore } from "@/stores/oauth";
import "@/assets/css/header.scss";

const user: any = useOauthStore().user;

const logout = () => {
  useOauthStore().clearUser();
  router.replace("/");
};
</script>

<template>
  <header id="header">
    <div class="header-left"><span>Tarot系统</span></div>
    <div class="header-center">
      <ul>
        <!--遍历选择后系统的一级菜单-->
        <!--        <li v-for="(menu, key) in menus" :class="active === key ? 'active' : ''" @click="haderMenuClick(key, menu)" v-text="menu.name" ></li>-->
      </ul>
    </div>
    <div class="header-right">
      <ul>
        <li>
          <!--遍历系统-->
          <!--          <el-select v-model="defaultSelectSystem" placeholder="请选择" @change="controllChange">-->
          <!--            <el-option v-for="option in controll" :key="option.id" :label="option.label" :value="option.id" ></el-option>-->
          <!--          </el-select>-->
        </li>
        <li>{{ user.username }}</li>
        <li @click="logout()">退出</li>
      </ul>
    </div>
  </header>
</template>
